package com.ruoyi.transaction.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.transaction.mapper.RiderMapper;
import com.ruoyi.transaction.domain.Rider;
import com.ruoyi.transaction.service.IRiderService;

/**
 * 骑手信息Service业务层处理
 *
 * @author swy
 * @date 2025-08-09
 */
@Service
public class RiderServiceImpl implements IRiderService
{
    @Autowired
    private RiderMapper riderMapper;

    /**
     * 查询骑手信息
     *
     * @param riderId 骑手信息主键
     * @return 骑手信息
     */
    @Override
    public Rider selectRiderByRiderId(Integer riderId)
    {
        return riderMapper.selectRiderByRiderId(riderId);
    }

    /**
     * 查询骑手信息列表
     *
     * @param rider 骑手信息
     * @return 骑手信息
     */
    @Override
    public List<Rider> selectRiderList(Rider rider)
    {
        return riderMapper.selectRiderList(rider);
    }

    /**
     * 新增骑手信息
     *
     * @param rider 骑手信息
     * @return 结果
     */
    @Override
    public int insertRider(Rider rider)
    {
        return riderMapper.insertRider(rider);
    }

    /**
     * 修改骑手信息
     *
     * @param rider 骑手信息
     * @return 结果
     */
    @Override
    public int updateRider(Rider rider)
    {
        return riderMapper.updateRider(rider);
    }

    /**
     * 批量删除骑手信息
     *
     * @param riderIds 需要删除的骑手信息主键
     * @return 结果
     */
//    @Override
//    public int deleteRiderByRiderIds(Integer[] riderIds)
//    {
//        return riderMapper.deleteRiderByRiderIds(riderIds);
//    }

     @Override
     public int deleteRiderByRiderIds(Integer[] riderIds) {
        return riderMapper.deleteRiderByRiderIds(riderIds);
    }

    /**
     * 删除骑手信息信息
     *
     * @param riderId 骑手信息主键
     * @return 结果
     */
    @Override
    public int deleteRiderByRiderId(Integer riderId) {
        return riderMapper.deleteRiderByRiderId(riderId);
    }



}
